/* fileHandler.h */

#ifndef filehandler_h
#define filehandler_h
#include "httpConnectionHandler.h"
/* Structs */
typedef enum {
	RESULT_OK, FILE_NOT_FOUND, STAT_ERROR, CTIME_ERROR, NO_CHANGE
} fileErrorT;

typedef struct {
	int contentSize;
	int fileBufferSize;
	char *fileContent;
	char lastModified[80]; // no
	char contentType[80];
} fileInfoT;

/* Prototypes */
int getFileContents(fileInfoT *fileInfo, char* requestedFile);
int readLogFile(fileInfoT *fileInfo);
int getHttpContents(fileInfoT *fileInfo, httpConnectionT *conn);
#endif